package com.sca4cloud.sca.test.jasypt;

import org.springframework.security.crypto.factory.PasswordEncoderFactories;
import org.springframework.security.crypto.password.PasswordEncoder;

public class PwdEncoder {

	public static void main(String[] args) {
		PasswordEncoder pe=PasswordEncoderFactories.createDelegatingPasswordEncoder();
		
		System.out.println(pe.encode("test"));
		String p="{bcrypt}$2a$10$KmlIifiID1TO5FQ.aNXofOUfoIoauPLVALdl6F0rhYCJC4/cEcVwC";
		System.out.println(pe.matches("test", p));

	}

}
